home *** CD-ROM | disk | FTP | other *** search
- unit UFormula;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Tempunit, ComCtrls, StdCtrls, Buttons, OleCtrls, CELLLib_TLB, ExtCtrls;
-
- type
- TFFormula = class(TTemplate)
- BitBtn2: TBitBtn;
- procedure FormShow(Sender: TObject);
- procedure BitBtn2Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- FFormula: TFFormula;
-
- implementation
-
- {$R *.DFM}
-
- procedure TFFormula.FormShow(Sender: TObject);
- begin
- inherited;
- Cell1.DoSetCellString( 0, 1, 'Jan');
- Cell1.DoSetCellString( 1, 1, 'Feb');
- Cell1.DoSetCellString( 2, 1, 'Mar');
- Cell1.DoSetCellString( 3, 1, '1 Quarter');
- Cell1.DoSetCellString( 4, 1, '1 year');
-
- Cell1.DoSetCellValue( 0, 2, 567.5);
- Cell1.DoSetCellValue( 1, 2, 679.3);
- Cell1.DoSetCellValue( 2, 2, 368.3);
-
- Cell1.DoSetFormula( 3, 2, 'a3+b3+c3');
- Cell1.DoSetFormula( 4, 2, 'd3*4');
-
- Cell1.PageLabelVisible := False;
- end;
-
- procedure TFFormula.BitBtn2Click(Sender: TObject);
- begin
- inherited;
- MESSAGEdlg('CELL support 4 data types: Sting, number, unit and region '+
- 'You can useing Wizard or you can defined yourself function. '+
- 'All of the common operate such as copy, cut, add ,square can be '+
- 'process freely. And it support extral function. More information '+
- 'please refer to the manual.', mtInformation,[mbOk], 0);
-
- end;
-
- end.
-